//
// Created by zhouwd on 2019/7/4.
//

#ifndef IPTVSETTING_AUDIO_ENCODE_H
#define IPTVSETTING_AUDIO_ENCODE_H
#include <media/NdkMediaCodec.h>
#include <cstdlib>
#include <cstring>
#include <android/log.h>
#include <time.h>
#define LOG_TAG "CAMERA-RENDER"
#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)

typedef class _AUDIO_ENCODE {
private:
    const char *dst_file_path;
    AMediaCodec *codec;
    bool status = false;
    int64_t presentationTimeUs;
public:
    int init();
    int encode(char *data, size_t buf_size);
    int stopEncode();
} AudioEncode;


#endif //IPTVSETTING_AUDIO_ENCODE_H
